package com.read.mapper;

import com.read.dto.params.NovelCommentParamsDto;
import com.read.dto.result.NovelCommentResultDto;
import com.read.entity.NovelComment;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface NovelCommentMapper {
    int insert(NovelComment record);

    int insertSelective(NovelComment record);

    /**
     * @description 用户评价小说
     * @author sh-sunb6
     * @date 2019-03-15 15:58
     */
    int userCommentNovel(NovelCommentParamsDto params);

    /**
     * @description 删除评论
     * @author sh-sunb6
     * @date 2019-03-18 17:18
     */
    int deleteCommentById(@Param("commentId") int commentId);

    /**
     * @description 查询评论
     * @author sh-sunb6
     * @date 2019-03-20 15:50
     */
    List<NovelCommentResultDto> selectComment(@Param("novelId") int novelId, @Param("startPage") int startPage, @Param("pageSize") int pageSize);


}